#include <iostream>
#include <cstdio>
#include <cctype>
#include <cmath>
#include <cstring>
#include <string>
#include <vector>
#include <algorithm>
#include <queue>
#include <stack>
 
using namespace std;
typedef long long ll;
const int N = 100005;

int st[20][N], ln[N], val[N];

void initrmq(int n){
int i, j, k, sk;
 ln[0] = ln[1] = 0;
for (i = 0; i < n; i++) st[0][i] = val[i];
for (i = 1, k = 2; k < n; i++, k <<= 1) {
 for (j = 0, sk = (k >> 1); j < n; ++j, ++sk) {
 st[i][j] = st[i-1][j];
 if (sk < n && st[i][j] > st[i-1][sk])
 st[i][j] = st[i-1][sk];
 }
 for (j=(k>>1)+1; j <= k; ++j) ln[j] = ln[k>>1] + 1;
 }
for (j=(k>>1)+1; j <= k; ++j) ln[j] = ln[k>>1] + 1;
}

int query(int x, int y) // min of { val[x] ... val[y] }
{
int bl = ln[y - x + 1];
return min(st[bl][x], st[bl][y-(1<<bl)+1]);
}

int main(){
	for(int i=0;i<10;i++){
		val[i] = 135-i;
	}
	initrmq(10);
	printf("%d\n", query(2, 3));
	return 0;
}
